<?php
/**
 * 简单工厂模式----设计模式
 * Created by Jason.
 * User: Administrator
 * Date: 2019/12/7 0007
 * Time: 下午 3:04
 */

namespace app\index\service;

use app\index\interfaces\Product;

class DigitalProduct implements Product
{
    private $price;
    public function __construct(int $price)
    {
        $this->price = $price;
    }
    public function calculatePrice(): int
    {
        return $this->price;
    }
}